package com.qfedu.tantu.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qfedu.tantu.dto.Attractionsdto;
import com.qfedu.tantu.dto.IndexAttractionsDto;
import com.qfedu.tantu.entity.Attractions;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
 * |                     ______                     |
 * |                  .-"      "-.                  |
 * |                 /            \                 |
 * |     _          |              |          _     |
 * |    ( \         |,  .-.  .-.  ,|         / )    |
 * |     > "=._     | )(__/  \__)( |     _.=" <     |
 * |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |
 * |           "=._"(_     ^^     _)"_.="           |
 * |               "=\__|IIIIII|__/="               |
 * |              _.="| \IIIIII/ |"=._              |
 * |    _     _.="_.="\          /"=._"=._     _    |
 * |   ( \_.="_.="     `--------`     "=._"=._/ )   |
 * |    > _.="                            "=._ <    |
 * |   (_/                                    \_)   |
 * |                                                |
 * '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='
 * -----------------代码的搬运工-----------------
 *
 * @Date: 2022/07/01/18:28
 */
public interface AttractionsDao extends BaseMapper<Attractions> {
    //景点列表
    @Select("select id,name,price,imgurl,label,city from t_attractions")
    List<Attractionsdto> selectAll();
    //通过城市id查询景点信息
    @Select("select *from t_attractions where id = #{id}")
    List<Attractionsdto> selectById(int id);
    @Select("select  distinct name, city,imgurl from t_attractions limit 4 ")
    List<IndexAttractionsDto> indexQuery();

}
